package com.prs.crm.dao.doc.impl;
import java.util.Collection;

import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;

import com.prs.crm.dao.doc.DocTaskSendDao;
import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.domain.doc.DocTaskSend;
import com.prs.crm.domain.doc.Document;

public class DocTaskSendDaoImpl extends BaseDaoImpl<DocTaskSend> implements
		DocTaskSendDao {

	@Override
	public Collection<Document> getDocTaskSendByIds(Integer[] ids) {
		Criteria criteria = this.getSession().createCriteria(Document.class);
		criteria.add(Restrictions.in("id", ids));
		criteria.addOrder(Order.desc("recordTime"));
		return criteria.list();
	}

	

}
